-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add CRDs printcolumns #353
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
- Coverage 65.19% 64.98% -0.22%
==========================================
Files 35 35
Lines 3795 3795
==========================================
- Hits 2474 2466 -8
- Misses 1127 1133 +6
- Partials 194 196 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
looking good! |
We need to check this in openshift and see how it integrates. |
Synced with @grzpiotrowski on a call and we had a look at OpenShift install - looks like we can still see all the fields with either a |
@@ -200,6 +200,10 @@ func (s *AuthPolicyStatus) Equals(other *AuthPolicyStatus, logger logr.Logger) b | |||
// +kubebuilder:object:root=true | |||
// +kubebuilder:subresource:status | |||
// +kubebuilder:metadata:labels="gateway.networking.k8s.io/policy=direct" | |||
// +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.conditions[0].reason`,description="AuthPolicy Status",priority=2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This relies on the fact the we currently only set one condition per status stanza, which is fine for now.
Soon, it will have to differentiate Accepted
and Enforced
. E.g.:
// +kubebuilder:printcolumn:name="Accepted",type=string,JSONPath=`.status.conditions[?(@.type=="Accepted")].status`,description="AuthPolicy Accepted",priority=2
// +kubebuilder:printcolumn:name="Enforced",type=string,JSONPath=`.status.conditions[?(@.type=="Enforced")].status`,description="AuthPolicy Enforced",priority=2
See https://docs.kuadrant.io/architecture/rfcs/0004-policy-status.
This PR adds new columns with status and target refs information to kubectl get output with -o wide option.
Examples of the new output:
For RateLimitPolicy:
For AuthPolicy:
For Kuadrant:
Verification
Verification trough one of the guides.
Closes #345